<template>
  <div class="blindData">
    <div
      class="task-item task-item-4"
      v-for="(item, idx) in list"
      :key="idx"
      @click="jumpDetail(item, idx)"
    >
      <div class="item-inner">
        <div
          class="banner-bg"
          :style="{
            'background-image':
              'url(' +
              require('@/assets/images/blindBox/banner' + (idx + 1) + '.png') +
              ')',
          }"
        ></div>
        <div class="stage-title">Phase 20</div>
        <div class="title">JOJO NFT Blind Box</div>
        <div class="sold-tips">Sold Out</div>
      </div>
    </div>
  </div>
</template>
<script>
export default {
  props: {
    tabList: {
      type: Array,
      default: null,
    },
  },
  data: () => ({
    selected: 0,
    url: require("@/assets/images/blindBox/banner1.png"),
    list: [
      { name: "JOJO" },
      { name: "总质押数量" },
      { name: "我的质押数量" },
      { name: "总挖矿算力" },
    ],
  }),
  methods: {
    jumpDetail(item, idx) {
      this.$emit("onClick", idx);
    },
  },
};
</script>
<style  lang="scss" scoped>
.blindData {
  .task-item {
    display: block;
    color: #fff;
    position: relative;
    cursor: pointer;
    margin-bottom: 32px;
    @media screen and (min-width: 300px) and (max-width: 960px) {
      margin-bottom: 15px;
    }
    .item-inner {
      background: linear-gradient(90deg, #529888, #fbd748);
      border-radius: 32px;
      padding: 48px 68px;
      position: relative;
      -webkit-box-sizing: border-box;
      box-sizing: border-box;
      overflow: hidden;
      @media screen and (min-width: 300px) and (max-width: 960px) {
        padding: 20px 25px;
      }
    }
    .banner-bg {
      position: absolute;
      right: 0;
      top: 0;
      height: 100%;
      width: 100%;
      pointer-events: none;
      background-size: cover;
      background-position: 0;
      background-repeat: no-repeat;
      -webkit-transition: transform 0.8s ease;
      transition: transform 0.8s ease;
    }
    .stage-title {
      position: relative;
      height: 30px;
      background: rgba(0, 0, 0, 0.12);
      border-radius: 10px;
      font-size: 18px;
      display: -webkit-inline-box;
      display: -ms-inline-flexbox;
      display: inline-flex;
      -webkit-box-align: center;
      -ms-flex-align: center;
      align-items: center;
      -webkit-box-pack: center;
      -ms-flex-pack: center;
      justify-content: center;
      padding: 0 12px;
      @media screen and (min-width: 300px) and (max-width: 960px) {
        font-size: 14px;
      }
    }
    .title {
      font-size: 32px;
      font-weight: 700;
      margin-top: 12px;
      line-height: 1.1;
      position: relative;
      @media screen and (min-width: 300px) and (max-width: 960px) {
        font-size: 20px;
      }
    }
    .sold-tips {
      font-size: 24px;
      margin-top: 20px;
      position: relative;
      color: hsla(0, 0%, 100%, 0.8);
      @media screen and (min-width: 300px) and (max-width: 960px) {
        font-size: 15px;
        margin-top: 10px;
      }
    }
  }
}
</style>